<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
  Created by IntelliJ IDEA.
  User: WXC
  Date: 2021/11/29
  Time: 17:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>Title</title>
</head>
<script type="application/javascript">
    "${msg}"!==""?alert("${msg}"):"";
    function del(id) {
        if (confirm("确定删除吗？")) {
            location = "/meet/delete?id=" + id;
        }
    }

    function edit(id) {
        location = "/meet/selectN?id=" + id;
    }
</script>
<body>
<a href="/meet/selectName">添加</a>
<table>
    <tr>
        <th>id</th>
        <th>name</th>
        <th>order</th>
        <th>advance</th>
    </tr>

    <c:forEach items="${list}" var="m">
        <tr>
            <td>${m.id}</td>
            <td>${m.meeting_name}</td>
            <td><fmt:formatDate value="${m.meeting_order}" pattern="yyyy-MM-dd"/></td>
            <td>${m.advance_name}</td>
            <td><a href="javascript:edit(${m.id})">编辑</a></td>
            <td><a href="javascript:del(${m.id})">删除</a></td>
        </tr>
    </c:forEach>

</table>
</body>
</html>
